export function useTable() {
    const gridOptions = reactive<any>({
        border: true,
        columnConfig: {
            resizable: true,
        },
        columns: [
            { field: 'enterpriseId', title: '企业号', width: 100 },
            { field: 'enterpriseName', title: '企业名称', width: 200 },
            { field: 'status', slots: { default: 'status' }, title: '企业状态', width: 90 },
            { field: 'enterpriseShort', title: '企业简称', width: 150 },
            { slots: { default: 'enterpriseLevelId' }, title: '企业级别', width: 100 },
            { field: 'unifiedSocialCreditCode', title: '信用代码', width: 200 },
            { field: 'legalRepresentative', title: '企业法人', width: 90 },
            { field: 'cooperationType', slots: { default: 'cooperationType' }, title: '合作类型', width: 90 },
            { field: 'userName', title: '企业管理员', width: 100 },
            { field: 'createTime', slots: { default: 'createTime' }, title: '添加时间', width: 150 },
            { field: 'createdName', title: '添加人', width: 100 },
            { slots: { default: 'operate' }, title: '操作', width: 100 },
        ],
        data: [],
        editConfig: {
            mode: 'row',
            showStatus: true,
            trigger: 'manual',
        },
        height: 530,
        keepSource: true,
        loading: false,
        showOverflow: true,
        stripe: true,
    })

    const btns = [
        {
            label: '查看',
            text: true,
            value: 'view',
        },
        // {
        //     label: '编辑',
        //     text: true,
        //     value: 'edit',
        // },
        // {
        //     label: '删除',
        //     text: true,
        //     value: 'delet',
        // },
    ]

    return { btns, gridOptions }
}
